In the field of the production of hydrocarbons, after the operations for recovering hydrocarbons by means of the natural pressure of the underground formation containing the hydrocarbons, a so-called “primary” recovery, it is generally proceeded with so-called “secondary” recovery by injection of water. Within this context, it is generally necessary to treat water before its injection into the underground formation, in order get rid of the major portion of contaminants which it may contain, notably solid materials and drops of hydrocarbons. To do this, it is known how to resort to membrane filtration of water. Membrane filtration may be frontal or tangential. Tangential filtration has lesser risks of clogging the filters and therefore has a significantly longer lifetime (or requires less strict or less frequent maintenance).
Within the scope of tangential filtration, the retentate from the membrane filters is recycled towards said membrane filters. Carrying out a preliminary treatment of the water to be treated by means of a cyclonic separator, of a flotation unit or other unit, is known before feeding the membrane filters, in order to reduce the risks of clogging of the filters. However, membrane filtration devices presently used still have risks of clogging the membrane filters, which is particularly undesirable within the context of offshore hydrocarbon production, or even in Ran an undersea medium, where it is desired to limit as much as possible operations for maintenance or replacement of membrane filters. Therefore there exists a need of developing a method for treating water within the scope of enhanced oil recovery which allows a reduction in the risks of clogging of membrane filters.